package com.macaline.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

@ApiModel
@TableName(value = "permission")
public class Permission implements Serializable {

	@TableId(value = "id", type = IdType.AUTO)
	@JsonIgnore
	@ApiModelProperty(hidden = true, value = "权限id")
	private Integer id;

	@ApiModelProperty(value = "名称")
	private String name;

	@ApiModelProperty(value = "权限描述")
	private String descr;

	@ApiModelProperty(value = "权限资源URL")
	private String url;

	@ApiModelProperty(value = "父权限id")
	private Integer parentId;

	@ApiModelProperty(value = "权限标识")
	private String produce;

	public String getProduce() {
		return produce;
	}

	public void setProduce(String produce) {
		this.produce = produce;
	}

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescr() {
		return descr;
	}
	public void setDescr(String descr) {
		this.descr = descr;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public Integer getParentId() {
		return parentId;
	}
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@Override
	public String toString() {
		return "Permission{" +
				"id=" + id +
				", name='" + name + '\'' +
				", descr='" + descr + '\'' +
				", url='" + url + '\'' +
				", parentId=" + parentId +
				", produce='" + produce + '\'' +
				'}';
	}
}
